1. Field of the Invention
The present invention relates generally to data processing, and in particular to a computer implemented method and apparatus for managing a database. Still more particularly, the present invention relates to a computer implemented method, apparatus, and computer usable program code for automatically partitioning a table space for a database.
2. Description of the Related Art
Modern data access systems efficiently provide access to large amounts of data. Often information is stored in databases to allow multiple users to access the stored information as needed. Databases may use various table space structures based on the user's needs. A table space is an abstraction of a collection of containers in which database objects, including tables, are stored. A table space provides a level of indirection between a database and the tables stored within the database. The data, index, long field, and large object (LOB) portions of a table can be stored in the same table space or can be individually broken out into separate table spaces.
A table within a table space may be searched for uniquely identified elements allowing information to be extracted from the table space. Expanding a database while still keeping the required parameters necessary for indexing, searching, and linking the table space may be very difficult.
A segmented table space is composed of multiple segments that are linked together to access information within the table space. A segmented table space may allow for improved space management and techniques to improve query performance. One of the limitations present with the use of a segmented table space is the size limitation of the data set. Due to increasing data loads and general advances in information technology, the current size limits of a segmented table space may not be acceptable for many users. Because the segmented table space is not partitioned, maintenance operations cannot be performed at the partition level.
Database users are often faced with the need to use a partitioned table space to circumvent space limitations. Partitioned table spaces are able to accommodate a large table size and may allow the user to perform database maintenance operations, such as database backup, recovery, and reorganization operations at the partition level and in parallel. A partitioned table space also has drawbacks. For example, in a range-partitioned table space, the size of the table space in terms of the number of partitions and a key range for each partition is defined at the time the table space is created. In many cases, it is difficult if not impossible to find adequate partitioning parameters such as a defined key range for each partition. Additionally, the user needs to be able to accurately predict the size of the table space prior to actually using the table space.
Adding partitions may not be possible or may require redefining the table space parameters and moving data among partitions requiring additional time and effort. As a result, incrementally increasing table space as needed using currently available systems is often inefficient and impractical to most database users.